package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.ims.data.entityenum.EnumNotificationWay;
import com.hq.ims.data.entityenum.EnumReceiveStatus;
import com.hq.ims.data.vo.BusInfoNotificationMapstruct;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * @author 蒋柏平
 * @since 20241024
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Alias("BusInfoNotification")
@TableName(value = "bus_info_notification")
@ApiModel(value = "经营信息推送表", description = "经营信息推送表")
public class BusInfoNotification extends BaseModel<BusInfoNotification> implements Serializable {

    @ApiModelProperty(value = "经营信息推送ID")
    @TableId(value = "bus_info_notification_id", type = IdType.ASSIGN_UUID)
    private String busInfoNotificationId;

    @ApiModelProperty(value = "经营信息ID")
    @TableField(value = "busi_info_id")
    private String busiInfoId;

    @ApiModelProperty(value = "产业标记ID")
    @TableField(value = "industry_mark_id")
    private String industryMarkId;

    @ApiModelProperty(value = "产业标记名称")
    @TableField(value = "industry_mark_name")
    private String industryMarkName;

    @ApiModelProperty(value = "经营人员ID")
    @TableField(value = "busi_person_id")
    private String busiPersonId;

    @ApiModelProperty(value = "经营人员名称")
    @TableField(value = "busi_person_name")
    private String busiPersonName;

    @ApiModelProperty(value = "企业ID")
    @TableField(value = "company_id")
    private String companyId;

    @ApiModelProperty(value = "企业名称")
    @TableField(value = "company_name")
    private String companyName;

    @ApiModelProperty(value = "接收状态")
    @TableField(value = "receive_status")
    private EnumReceiveStatus receiveStatus;

    @ApiModelProperty(value = "拒收理由")
    @TableField(value = "reason_for_rejection")
    private String reasonForRejection;

    @ApiModelProperty(value = "处理时间")
    @TableField(value = "handle_date")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime handleDate;

    @ApiModelProperty(value = "推送时间")
    @TableField(value = "push_date")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime pushDate;

    @ApiModelProperty(value = "推送方式")
    @TableField(value = "notification_way")
    private EnumNotificationWay notificationWay;

    @ApiModelProperty(value = "")
    @TableField(value = "create_date_time", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "")
    @TableField(value = "update_date_time", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "")
    @TableField(value = "create_user_name", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "")
    @TableField(value = "update_user_name", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "")
    @TableField(value = "create_user_id", fill = FieldFill.INSERT)
    private String createUseId;

    @ApiModelProperty(value = "")
    @TableField(value = "update_user_id", fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;

    @ApiModelProperty(value = "")
    @TableField(value = "org_id", fill = FieldFill.INSERT)
    private String orgId;

    @ApiModelProperty(value = "")
    @TableField(value = "version")
    @Version
    private Integer version;

    @ApiModelProperty(value = "")
    @TableField(value = "is_del")
    @TableLogic
    private Boolean isDel;

    public BusInfoNotificationMapstruct.BusInfoNotificationRowAuthVo auth() {
        BusInfoNotificationMapstruct.BusInfoNotificationRowAuthVo auth = new BusInfoNotificationMapstruct.BusInfoNotificationRowAuthVo(this);
        return auth;
    }

}
